<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="/protected/template/mainLayout.xhtml">
	<ui:define name="content">
		<div id="customer_container">

			<div id="customer_navigationBar">
				<h:form>
					<a4j:repeat value="#{createCustomerBean.accessPath}" var="menuItem"
						rowKeyVar="rowIndex">
						<h:outputLink value="#{menuItem.url}" onclick="allowRedirect();"
							rendered="#{rowIndex == 0}">
							<h:outputText value="#{menuItem.menuName}" class="rootIndex" />
						</h:outputLink>
						<h:outputText value=" > " rendered="#{rowIndex >0}" />
						<h:outputText value="#{menuItem.menuName}"
							rendered="#{rowIndex >0}" class="currentIndex" />
					</a4j:repeat>
				</h:form>
			</div>
			<div id="customer_form">
				<h:form id="formId">
					<rich:panel>
						<rich:messages globalOnly="true" ajaxRendered="true"
							rendered="false"></rich:messages>
						<rich:messages layout="list" errorClass="errorMessage"
							fatalClass="errorMessage" infoClass="systemMessage"
							warnClass="warnMessage" showSummary="true" showDetail="false"
							style="background-image:none;" />

						<h:panelGrid columns="2" styleClass="panel-grid-default"
							id="addTabId">
							<rich:tabPanel switchType="client" id="addTabPanelId"
								activeItem="#{createCustomerBean.activeTab}">
								<c:forEach items="${createCustomerBean.functionList}" var="func">
									<ui:include src="#{func.uri}"></ui:include>
								</c:forEach>
							</rich:tabPanel>

							<h:panelGroup styleClass="customer-oper-button">

								<h:commandButton id="button_save_id"
									actionListener="#{createCustomerBean.saveCustomer}"
									value="#{msg.button_save}"
									onclick="allowRedirect(); javascript:if(window.confirm('#{info.msg_make_sure_to_save}')) return true; else return false;"></h:commandButton>
								<h:commandButton id="button_cancel_id"
									actionListener="#{createCustomerBean.cancelCustomer}"
									value="#{msg.button_cancel}" immediate="true"
									onclick="allowRedirect();javascript:if (window.confirm('#{info.msg_make_sure_to_cancel}')) return true; else return false;"></h:commandButton>
							</h:panelGroup>
						</h:panelGrid>


					</rich:panel>



				</h:form>
			</div>
		</div>
	</ui:define>
</ui:composition>

</html>